Matrix representation of conic sections